/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xos_cat.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __HELPER_OBJS_HELPER_MODULE_H__
#define __HELPER_OBJS_HELPER_MODULE_H__

// MAIN_ALL_MODULE_STARTTED : MAIN_ALL_MODULE_STOPPED

namespace xos_cat
{

    class module;

    class helper_module
    {
    public:
        helper_module();
        ~helper_module();

    public:
        static helper_module* get();

        static int load_all();
        static int start_all();
        static int stop_all();

        static int init();
        static int term();

    protected:
        static int helper_load( const char * lpszModule );
        static int start( module * pM );
        static int stop( module* pM );

    public:
        bool all_done_test( int nSub );

    protected:
        int init_data();

    private:
        bool m_bTest;
        int m_nNum;
        int m_nMsg;

    };

} // xos_cat

#endif // __HELPER_OBJS_HELPER_MODULE_H__
